<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width:100px;
            height: 100px;
            border: 1px solid red;
            /* div默认是块级元素 */
            
            /* 行内块元素，水平排列，放不下时换行 */
            display: inline-block;
            
            /* 内联元素，不支持宽高 */
            display: inline;
        }

        span{
            /* span默认是行内元素 */
            background-color: blueviolet;

            display: block;
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="box">1</div>
    <div class="box">2</div>
    <div class="box">3</div>
    <div class="box">4</div>

    <span>我是span</span>
</body>
</html>